import request from '@/utils/request'

// 查询平台列表（前端查询不拦截）
export function toolListPlatforms(query) {
  return request({
    url: '/base/platforms/tool/tooList',
    method: 'get',
    params: query
  })
}

// 查询平台列表（前端查询不拦截）
export function firstLeveList() {
  return request({
    url: '/base/platforms/tool/firstLeveList',
    method: 'get',
    params: {}
  })
}


// 查询平台列表
export function listPlatforms(query) {
  return request({
    url: '/base/platforms/list',
    method: 'get',
    params: query
  })
}

// 查询平台详细
export function getPlatforms(platformId) {
  return request({
    url: '/base/platforms/' + platformId,
    method: 'get'
  })
}

// 新增平台
export function addPlatforms(data) {
  return request({
    url: '/base/platforms',
    method: 'post',
    data: data
  })
}

// 修改平台
export function updatePlatforms(data) {
  return request({
    url: '/base/platforms',
    method: 'put',
    data: data
  })
}

// 删除平台
export function delPlatforms(platformId) {
  return request({
    url: '/base/platforms/' + platformId,
    method: 'delete'
  })
}
